<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateVoteSurveyTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('survey', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键');
			$table->string('title', 50)->comment('标题');
			$table->string('intro')->comment('简介');
			$table->string('image')->nullable()->comment('图片');
			$table->integer('create_at')->comment('发布时间');
			$table->integer('end_at')->comment('截止时间');
			$table->integer('cate_id')->unsigned()->nullable()->default(1)->comment('问卷分类');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('vote_survey');
	}

}
